package com.xinzhi.model;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 优惠券表
 * </p>
 *
 * @author laohan
 * @since 2024-01-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Coupons对象", description="优惠券表")
public class Coupons implements Serializable {

private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String uuid;

    @ApiModelProperty(value = "兑换码")
    private String code;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "副标题")
    private String subTitle;

    @ApiModelProperty(value = "封面")
    private String thumb;

    @ApiModelProperty(value = "店铺id")
    private Integer shopId;

    @ApiModelProperty(value = "描述")
    private String description;

    @ApiModelProperty(value = "使用人群，空则不限制")
    private Integer userGroupId;

    @ApiModelProperty(value = "0为用户领取， 1为自动发放")
    private Integer transferType;

    @ApiModelProperty(value = "0全场通用  1为指定盲盒  2为指定商品")
    private Integer usableRangeType;

    @ApiModelProperty(value = "可以商品或分类id数组")
    private String usableIds;

    @ApiModelProperty(value = "0为无金额限制    1为限制金额")
    private Integer moneyLimitType;

    @ApiModelProperty(value = "最小可用订单金额")
    private Integer minimumMoney;

    @ApiModelProperty(value = "0为减现金   1为打折")
    private Integer discountType;

    @ApiModelProperty(value = "减少现金")
    private Integer discountMoney;

    @ApiModelProperty(value = "折扣，1到99")
    private Integer discountRate;

    @ApiModelProperty(value = "折扣券最大可抵扣金额")
    private Integer discountMoneyLimit;

    @ApiModelProperty(value = "0为固定时间   1为领取后固定时间内")
    private Integer timeLimitType;

    @ApiModelProperty(value = "领取后有效时间 小时")
    private Integer validTime;

    @ApiModelProperty(value = "固定开始时间")
    private Date usableStartAt;

    @ApiModelProperty(value = "固定结束时间")
    private Date usableEndAt;

    @ApiModelProperty(value = "已被使用的")
    private Integer usedTotal;

    @ApiModelProperty(value = "首单可用")
    private Boolean isLimitFirstOrder;

    @ApiModelProperty(value = "每个用户可领数量")
    private Integer usablePerUser;

    @ApiModelProperty(value = "1为正常 0为下架")
    private Integer status;

    private Date deletedAt;

    private Date createdAt;

    private Date updatedAt;

    @ApiModelProperty(value = "0为不可分享 1为可分享")
    private Boolean isShareable;

    @ApiModelProperty(value = "积分兑换价格")
    private Integer scorePrice;

    @ApiModelProperty(value = "人民币价格")
    private Integer moneyPrice;

    @ApiModelProperty(value = "库存")
    private Integer stock;

    @ApiModelProperty(value = "销量")
    private Integer sales;

    @ApiModelProperty(value = "兑换码发放")
    private Integer saleByCode;

    @ApiModelProperty(value = "页面中手动领取")
    private Integer saleByManual;

    @ApiModelProperty(value = "系统发放")
    private Integer saleBySystem;

    @ApiModelProperty(value = "去使用时跳转链接")
    private String toUseLink;


}
